using System.Drawing.Printing;
// using System;

namespace GURUCORE.GForm.Core.Common
{
	/// <summary>
	/// //TODO: We need to comment for Constants.
	/// </summary>	
	public sealed class Constants
	{
		#region REPORT

		/// <summary>
		/// ReportHistory_
		/// </summary>
		public const string REPORT_HISTORY_PREFIX = "ReportHistory_" ;
		/// <summary>
		/// Constant for report
		/// </summary>
		public const decimal REPORT_DEFAULT_TOP = 1;
		public const decimal REPORT_DEFAULT_BOTTOM = 1;
		public const decimal REPORT_DEFAULT_LEFT = 1;
		public const decimal REPORT_DEFAULT_RIGHT = 1;
		public const decimal REPORT_DEFAULT_GUTTER = 1;

		public const bool REPORT_DEFAULT_ORIENTATION = false;
		public const int REPORT_DEFAULT_PAPER_SIZE = (int)PaperKind.A4;

		public const int  REPORT_DEFAULT_TABLE_BORDER = 0;
		public const bool REPORT_DEFAULT_GUTTER_POSITION = false;



		/// <summary>
		/// SQL
		/// </summary>
		public const string SQL_REPORT = "SQL";
		/// <summary>
		/// Custom Report
		/// </summary>
		public const string CUSTOM_REPORT = "Custom Report";
		/// <summary>
		/// Dynamic Link Library
		/// </summary>
		public const string DLL_REPORT = "Dynamic Link Library";
		/// <summary>
		/// C# File
		/// </summary>
		public const string CSHARP_FILE_REPORT = "C# File";

		/// <summary>
		/// | 
		/// </summary>
		public const char REPORT_FONT_SEPARATOR = '|';



		public const string REPORT_DEFINITION_STORE_LOCATION = "ReportDefinition";
		public const string EXCEL_REPORT_LOCATION = "ExcelReports";
		
		#endregion REPORT



		#region FORM
		#endregion FORM



		#region ADMIN
		#endregion ADMIN


		
		#region FORMATTING
		#endregion FORMATTING



		#region CONST_STRING
		#endregion CONST_STRING




		/// <summary>
		/// Right to view
		/// </summary>
		public const int RIGHT_VIEW = 1;
		/// <summary>
		/// Right to add
		/// </summary>
		public const int RIGHT_ADD = 2;
		/// <summary>
		/// Right to edit
		/// </summary>
		public const int RIGHT_EDIT = 4;
		public const int RIGHT_DELETE = 8;
		public const int RIGHT_PRINT = 16;

		public const string BUTTON_ADD_NAME = "btnAdd";
		public const string BUTTON_EDIT_NAME= "btnEdit";
		public const string BUTTON_SAVE_NAME= "btnSave";
		public const string BUTTON_DELETE_NAME = "btnDelete";
		public const string BUTTON_PRINT_NAME = "btnPrint";


		/// <summary>
		/// PCS.log
		/// </summary>
		public const string PCS_LOG_FILE = "PCS.log";
		/// <summary>
		/// ..\\..\\PCS.config
		/// </summary>
		public const string CONFIG_PATH = "..\\..\\PCS.config";
		/// <summary>
		/// 0
		/// </summary>
		public const string ERROR_MSG_TYPE = "0";
		/// <summary>
		/// 1
		/// </summary>
		public const string INFO_MSG_TYPE = "1";
		/// <summary>
		/// uid
		/// </summary>
		public const string USERNAME_STR = "uid";		
		/// <summary>
		/// pwd
		/// </summary>
		public const string PASSWORD_STR = "pwd";
		/// <summary>
		/// ConnectionString
		/// </summary>
		public const string CONNECTION_STRING = "ConnectionString";
		/// <summary>
		/// 1
		/// </summary>
		public const int TRUE_VALUE = 1;
		/// <summary>
		/// -1
		/// </summary>
		public const int FALSE_VALUE = -1;
		
		/// <summary>
		/// U
		/// </summary>
		// public const string UPDATE_ACTION = "U";
		/// <summary>
		/// I
		/// </summary>
		// public const string INSERT_ACTION = "I";
		/// <summary>
		/// D
		/// </summary>
		// public const string DELETE_ACTION = "D";
		/// <summary>
		/// Update
		/// </summary>
		public const string UPDATE_STR = "Update";
		/// <summary>
		/// Insert
		/// </summary>
		public const string INSERT_STR = "Insert";
		/// <summary>
		/// Delete
		/// </summary>
		public const string DELETE_STR = "Delete";
		/// <summary>
		/// #
		/// </summary>
		public const char VIEW_TABLE_ITEM_SEPARATOR = '#';
		/// <summary>
		/// _
		/// </summary>
		public const char VIEW_TABLE_FILTER_SEPARATOR = '_';
		

		/// <summary>
		/// Production Control System
		/// </summary>
		public const string APPLICATION_NAME = "Alphanam Production Control";
		
	
		/// <summary>
		/// Copy of 
		/// </summary>
		public const string  COPY_OF = "Copy of ";
		/// <summary>
		/// 13
		/// </summary>
		public const int ENTER_KEY_CHAR = 13;
		/// <summary>
		///  FROM 
		/// </summary>
		public const string FROM_STR = " FROM ";
		/// <summary>
		///  INTO 
		/// </summary>
		public const string INTO_STR = " INTO ";
		
		public const int INCHE_TWIPS_RATE = 1440; // DungLA correct
		public const int COST_ELEMENT_IS_LEAF = 1;



		/// <summary>
		/// Name=
		/// </summary>
		public const string FONT_NAME = "Name=";
		/// <summary>
		/// Size=
		/// </summary>
		public const string FONT_SIZE = "Size=";
		/// <summary>
		/// Style=
		/// </summary>
		public const string FONT_STYLE = "Style=";
		/// <summary>
		/// GdiCharSet=
		/// </summary>
		public const string FONT_CHARSET = "GdiCharSet=";
		/// <summary>
		/// GdiVerticalFont=
		/// </summary>
		public const string FONT_VERTICAL_FONT = "GdiVerticalFont=";
		/// <summary>
		/// Units=
		/// </summary>
		public const string FONT_UNITS = "Units=";
		/// <summary>
		/// GROUP BY
		/// </summary>
		public const string GROUP_BY = "GROUP BY"; 	
		/// <summary>
		/// HAVING
		/// </summary>
		public const string HAVING = "HAVING";
		/// <summary>
		/// BY
		/// </summary>
		public const string BY = "BY";
		/// <summary>
		/// ORDER
		/// </summary>
		public const string ORDER = "ORDER";
		/// <summary>
		/// " " (white space)
		/// </summary>
		public const string WHITE_SPACE = " ";
		/// <summary>
		/// [
		/// </summary>
		public const string OPEN_SBRACKET = "[";
		/// <summary>
		/// ]
		/// </summary>
		public const string CLOSE_SBRACKET = "]";
		/// <summary>
		/// SELECT
		/// </summary>
		public const string SELECT_STR = "SELECT";
		/// <summary>
		/// PRECISION
		/// </summary>
		public const string GET_FIELD_LENGTH = "PRECISION";

// HACK: SonHT 2005-10-13 Using PlanTypeEnum
//		/// <summary>
//		/// 1
//		/// </summary>
//		public const int PLANTYPE_MRP = 1;
//		/// <summary>
//		/// 2
//		/// </summary>
//		public const int PLANTYPE_MPS = 2;
// END: SonHT 2005-10-13

		/// <summary>
		/// ID
		/// </summary>
		public const string ID_FIELD = "ID";
		/// <summary>
		/// VALUE
		/// </summary>
		public const string VALUE_FIELD ="VALUE";
		/// <summary>
		/// WHERE
		/// </summary>
		public const string WHERE_KEYWORD = "WHERE";
		
		/// <summary>
		/// en-US
		/// </summary>
		public const string CULTURE_EN = "en-US";
		/// <summary>
		/// vi-VN
		/// </summary>
		public const string CULTURE_VN = "vi-VN";
		/// <summary>
		/// ja-JP
		/// </summary>
		public const string CULTURE_JP = "ja-JP";
		/// <summary>
		/// dd-MM-yyyy
		/// </summary>
		public const string DATETIME_FORMAT = "dd-MM-yyyy";
		/// <summary>
		/// dd-MM-yyyy HH:mm:ss
		/// </summary>
		//public const string DATETIME_FORMAT_HOUR = "dd-MM-yyyy HH:mm:ss";
		public const string DATETIME_FORMAT_HOUR = "dd-MM-yyyy HH:mm";
		/// <summary>
		/// 0.00
		/// </summary>
		public const string CELL_NUMBER_FORMAT = "0.00";
		/// <summary>
		/// =
		/// </summary>
		public const string EQUAL = "=";
		/// <summary>
		///  LIKE '
		/// </summary>
		public const string LIKE_OPEN = " LIKE '";
		/// <summary>
		/// %'
		/// </summary>
		public const string LIKE_CLOSE = "%'";
		/// <summary>
		///  AND 
		/// </summary>
		public const string AND = " AND ";
		/// <summary>
		/// YYYYMMDD0000
		/// </summary>
		public const string YYYYMMDD0000 = "YYYYMMDD0000";		

		/// <summary>
		///  IN 
		/// </summary>
		public const string IN_KEYWORD = " IN ";
		/// <summary>
		/// .
		/// </summary>
		public const string DOT  = ".";
		/// <summary>
		/// ,
		/// </summary>
		public const string COMMA  = ",";









		//TRANTYE
		/// <summary>
		/// SaleOrder
		/// </summary>
		public const string TRANTYPE_SALEORDER="SaleOrder";
		/// <summary>
		/// SOReturnGoodsReceive
		/// </summary>
		public const string TRANTYPE_SORETURNGOODSRECEIVE="SOReturnGoodsReceive";
		/// <summary>
		/// SOReturnGoodsReceive
		/// </summary>
		public const string TRANTYPE_SOCANCELCOMMITMENT="SOCancelCommitment";
		/// <summary>
		/// POPurchaseOrder
		/// </summary>
		public const string TRANTYPE_POPURCHASEORDER="POPurchaseOrder";
		/// <summary>
		/// POPurchaseOrderReceipts
		/// </summary>
		public const string TRANTYPE_POPURCHASEORDERRECEIPTS="POPurchaseOrderReceipts";
		/// <summary>
		/// POReturnToVendor
		/// </summary>
		public const string TRANTYPE_PORETURNTOVENDOR="POReturnToVendor";
	
		/// <summary>
		/// ##############,0.00
		/// </summary>
		public const string DECIMAL_NUMBERFORMAT = "##############,0.00";
		/// <summary>
		/// ##############,0
		/// </summary>
		public const string INTERGER_NUMBERFORMAT = "##############,0";

		/// <summary>
		/// 08-2005
		/// </summary>
		public const string MONTH_YEAR_FORMAT = "MM-yyyy";

		








		//BACKGROUND_COLOUR

		// New color is Color.LemonChiffon
		public const int BACKGROUND_COLOUR_R = 255;
		public const int BACKGROUND_COLOUR_G = 250;
		public const int BACKGROUND_COLOUR_B = 205;
		//FORE_COLOUR
		public const int FORE_COLOUR_R =0;
		public const int FORE_COLOUR_G =0;
		public const int FORE_COLOUR_B =0;

		public const string ADMINISTRATORS ="Administrators";
		public const string ALL_ROLE ="(All)";

		public const string  SO_NUMBERFORMAT="SO_NUMBERFORMAT";
		public const string  SO_RG_NUMBERFORMAT="SO_RG_NUMBERFORMAT";
		public const string  PO_NUMBERFORMAT="PO_NUMBERFORMAT";		




		/// <summary>
		/// datetime
		/// </summary>
		public const string DATETIME_TYPE = "datetime";
		/// <summary>
		/// bit
		/// </summary>
		public const string BOOLEAN_TYPE = "bit";
		/// <summary>
		/// int
		/// </summary>
		public const string INTEGER_TYPE = "int";
		/// <summary>
		/// string
		/// </summary>
		public const string STRING_TYPE = "string";
		/// <summary>
		/// nvarchar
		/// </summary>
		public const string NVARCHAR_TYPE = "nvarchar";
		/// <summary>
		/// varchar
		/// </summary>
		public const string VARCHAR_TYPE = "varchar";









		/// <summary>
		/// ###,###.00
		/// </summary>
		public const string EDIT_NUM_MASK = "###,###.00";
		/// <summary>
		/// ###,##0 for integer data type
		/// </summary>
		public const string INT_DSP_NUM_MASK = "###,##0"; 
		/// <summary>
		/// 0
		/// </summary>
		public const int BIT_DEFAULT_VALUE = 0;
		/// <summary>
		/// super
		/// </summary>
		
		public const string SUPER_ADMIN_USER="super";
		public const string ADMINISTRATORS_ROLE="Administrators";
		public const string COMMITED_QTY_COL = "CommitedQuantity";
		public const string NEEDED_QTY_COL = "NeededQuantity";
		public const string AVAILABLE_QTY_COL = "AvailableQuantity";

		public const string DEMAND_QUANTITY_FLD = "DemandQuantity";
		public const string SUPPLY_QUANTITY_FLD = "SupplyQuantity";
		




		/// <summary>
		/// 21
		/// </summary>
		public const int DEFAULT_ROW_HEIGHT = 21;
		/// <summary>
		/// 200
		/// </summary>
		public const int DEFAULT_C1COMBO_DROPDOWNWIDTH = 200;
	}

	


	#region May be change to Enum or remove

	//Constant for system parameters (sys_Param table)
	public sealed class  SystemParam
	{
		public const string DB_VERSION = "DBVersion";	
		public const string COMPANY_NAME = "CompanyName";	
		public const string ADDRESS = "Address";	
		public const string TEL = "Tel";	
		public const string FAX = "Fax";	
		public const string COMPANY_FULL_NAME = "CompanyFullName";	
		public const string BANK_NAME = "BankName";	
		public const string BANK_ADDR = "BankAddr";	
		public const string ACCOUNT = "Account";	
		public const string OSR_ACTIVE_DATE = "OrderSummaryReportActiveDate";	
		public const string OSR_VERSION = "OrderSummaryReportVersion";	
	}

	// TODO: Add constant for table name or view name	
	public sealed class PCSSortType 
	{
		public const int NONE = 0;	
		public const int ASCENDING = 1;		
		public const int DESCENDING = 2;
	}
	public sealed class PCSAligmentType 
	{
		/// <summary>
		/// 0: Left alignment
		/// </summary>
		public const int LEFT = 0;	
		/// <summary>
		/// 1: Center alignment
		/// </summary>
		public const int CENTER = 1;
		/// <summary>
		/// 2: Right alignment
		/// </summary>
		public const int RIGHT = 2;
		/// <summary>
		/// 3 (DungLA order for Report Framework)
		/// </summary>
		public const int NONE = 3;
	}


	
	#endregion


	
}

